<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>材料管理</title>
<%@ include file="/module/js.jsp"%>
<link rel="stylesheet" href="${basePath}/css/zTreeStyle.css" type="text/css"></link>
<script type="text/javascript" src="${basePath}/js/jquery.ztree.all-3.1.min.js"></script>

</head>
<body>
	
<script type="text/javascript">
var root={icon:'img/stree/root.gif'},currpid='';
function onClick(event, treeId, treeNode, clickFlag){
	currpid=treeNode.id;
}
	var setting = {
			data: {
				key: {
					title:"t"
				},
				simpleData: {
					enable: true
				}
			},
			callback: {
				onClick: onClick
			}
		};
	$(document).ready(function() {	
		var data=$.parseJSON('${tree}');
		var new_data=[];
		$.each(data,function(i,item){
			if(item.id=='0')
				new_data.push($.extend(item,root));
			else
				new_data.push(item);
		});
		
		$.fn.zTree.init($(".simpleTree"), setting, new_data);
		
		
		
		
	});
	
	
	
	
</script>
</head>
<body>

	<div class="addtop">
	</div>
	<div class="content" style="text-align: left; width: 100%;margin-top: 20px">
		<div style="float: left;margin-left: 35px">
		
	     	<input icon="icon-add" value="xxx"  id="addDept" type="button">&nbsp;</input>
	     	<input icon="icon-edit" value="xxx"  id="modDept" type="button">&nbsp;</input>
	     	<input icon="icon-cancel" value="xxx" id="eDept"  type="button">&nbsp;</input>
	     	<input icon="icon-apply" value="xxx" id="sDept"  type="button">&nbsp;&nbsp;</input>
			
			<p></p>
			<ul class="simpleTree ztree">
				
			</ul>
		</div>
		<div style="margin-left: 10px; text-align: left;">
				<form action="#" name="deptForm" id="deptForm" method="post">
					<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="60%">
			<tr>
				<td class="table-header" colspan="4">xxxxx</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 30%"><font
					style="color: red;">*</font>xxxxx：</td>
				<td class="table-contentTD" style="width: 70%">
				<input type="text" id="projectName" name="projectName"  placeholder="xxxxx"   autocomplete="off" maxlength="100" class="required inputText" /></td>
			</tr>
			
		</table>
					<table cellpadding="1" cellspacing="1" border="0" align="left">
			</br>
	            	</br>
	            	</br>
				     <td><input type="button" id="btnBreak" value="返 回"
					 class="inputButton"/></td>	
			        
	            	</table>
	            	
			</div>
		<div class="clear"></div>
	</div>
	
	<script>

	//返回
	$('#btnBreak').click(function() {
		     window.location.href = "${basePath}/project/index";
	});
	     if("${msg}"!=""){
	       layer.alert("${msg}", {icon: 6});
	     }
	</script>
</body>
</html>
